import request from '@/utils/request'

import data from '@/views/system/dict/data.vue'
import teacher from '@/views/order/teacher/index.vue'

// 排版
// import request from '@/utils/request'
//
// 咨询师列表
export function teach(){
  return request({
    url:'/system/teacher/teacherAllList',
    method:'get'
  })
}

//排班日期
export function teacherTime(date,teacherId){
  return request({
    // url:'/schedule/list'+date,
    url:`/schedule/list?date=${date}&teacherId=${teacherId}`,
    method:'get',
    // params:query
  })
}

//咨询师
export function Consultant() {
  return request({
    url: '/system/teacher/list',
    method: 'get'
  })
}

//可约或者已满
export function reducible(date, teacherId) {
  return request({
    // url:"/schedule/list?teacherId="+data.teacherId+"&date="+data.date+"&id="+data.id,
    // url:`/schedule/list?teacherId=442395528404275200&date='2023-12-19'`,
    // url: `/schedule/list?date=${date}&teacherId=${id}`,
    // url:`/schedule/list?date='2023-12-19'&teacherId=442395528404275200`,
    // url:`/schedule/list?teacherId=${id}&date=${date}`,
    url: `/schedule/list?date=${date}&teacherId=${teacherId}`,
    method: 'get'
  })
}

// 时间段设置
//获取时间段日期
export function timest(){
  return request({
    url:'/time/list',
    method:'get',
  })
}

//添加时间段
export function timeAdd(query){
  return request({
    url:'/time/add',
    method:'post',
    data:query
  })
}

// 编辑时间段
export function ediTor(query){
  return request({
    url:'/time/edit',
    method:'put',
    data:query
  })
}

//删除时间段
export function deleteTime(ids){
  return request({
    url:'/time/delete',
    method:'delete',
    data:ids
  })
}

//富文本
export function text(data) {
  return request({
    url: '/platform/text/list',
    method: 'get',
    params: data
  })
}

export function textSeal(data) {
  return request({
    url: '/platform/text/edit',
    method: 'put',
    data: data
  })
}

// 班级管理
// export function school() {
//   return request({
//     url: '/system/dept/list',
//     method: 'get'
//   })
// }

// // 学院列表
// export function classList(id, name) {
//   return request({
//     url: `/student/class/list?deptId=${id}&name=${name}`,
//     method: 'get'
//   })
// }

// 班级列表
export  function ClassList(data){
  return request({
    url:`/student/class/list`,
    method:"get",
    params:data
  })
}
export function  SchoolList(data){
  return request({
    url:"/system/dept/list",
    method:"get",
    params:data
  })
}
// 添加班级！！！！！！！！！！！！！！！！！！！！！！！！！！！
export function  addClass(data){
  return request({
    url:"/student/class/addClass",
    method:"post",
    data:data
  })
}
// 删除班级!!!!!!!!!!!!!!!!!
export function delClass(data){
  return request({
    url:"/student/class/delete",
    method:"post",
    data:data
  })
}
// 编辑
export function  updateClass(data){
  return request({
    url:"/student/class/update",
    method:"post",
    data:data
  })
}
//渲染数据
export function slideView(data) {
  return request({
    url: '/slideshow/list',
    method: 'get',
    params: data
  })
}

//新增
export function slideAdd(data) {
  return request({
    url: '/slideshow/add',
    method: 'post',
    data: data
  })
}

//删除417762481881092096
export function slideDel(data) {
  return request({
    url: '/slideshow/delete',
    method: 'delete',
    params: data,
    headers: {
      Authorization: 'string'
    }
  })
}

//修改
export function slideEdit(data) {
  return request({
    url: '/slideshow/edit',
    method: 'put',
    data: data
  })
}

//
// 标签管理
//渲染数据
export function labelview(data) {
  return request({
    url: '/system/label/list',
    method: 'get',
    params: data
  })
}
//获取全部数据
export function userListview(data) {
  return request({
    url: '/system/label/useList',
    method: 'get',
    params: data
  })
}
//新增
export function labelAdd(data) {
  return request({
    url: '/system/label',
    method: 'post',
    data: data
  })
}
// 修改
export function labelModify(data) {
  return request({
    url: '/system/label',
    method: 'put',
    data: data
  })
}

export function labelDel(data) {
  console.log(data)
  return request({
    url: `/system/label/${data.ids}`,
    method: 'DELETE'
    // params: data
  })
}

// 栏目管理
export  function Column(){
  return request({
    url:"/system/category/list",
    method:'get'
  })
}
// 获取数据
export function  delColumn(ids){
  return request({
    url:`/system/category/${ids}`,
    method:'delete'
  })
}
// 增加
export function  addColumn(data){
  return request({
    url:"/system/category",
    method:"post",
    data:data
  })
}
// 编辑
export function setColumn(data){
  return request({
    url:"/system/category",
    method:"put",
    data:data
  })
}


